<?php
/**
 *
 */
class DefaultController extends Controller {

    public function actionIndex() {
        $this->render('index');
    }

    public function actionRegion($region){
        //read all block in this region
        $models = Block::model()->findAll(array(
            'order' => '`order`',
            'condition' => "`t`.`region` = '{$region}'"
        ));
        $this->render('list', array(
            'models' => $models
        ));
    }

}